add recipes to empty teapots (hot or cold)#58
add recipes to empty teapots (hot or cold)#58jshipley wants to merge 7 commits intoKnightMiner:1.20from
Conversation
| .requires(teapot_water) | ||
| .requires(Items.BUCKET) | ||
| .unlockedBy("has_item", has(teapot_water)) | ||
| .save(consumer, "water_bucket_from_teapot"); |
There was a problem hiding this comment.
Recipes should never go under minecraft. they should be under simplytea. If there is no resource location parameter set the namespace as a string, simplytea:water_bucket_from_teapot
There was a problem hiding this comment.
All recipes are going into the simplytea namespace now.
| } | ||
| builder.unlockedBy("has_bag", has(ingredients[0])); | ||
| builder.save(consumer); | ||
| builder.save(consumer, filledCup.toString() + "_" + ingredients[ingredients.length-1].toString()); |
There was a problem hiding this comment.
Don't use toString, that is very unreliable and I don't believe it includes the namespace. Get the registry ID, see suffix above. We probably don't need the namespace for the "from" part, just need to make sure the recipes are actually under simplytea. That, or just simply the logic by passing in a String suffix parameter. e.g.:
builder.save(consumer, suffix(filledCup, + "_from_" + suffix).toString())and pass in "cup" or "teapot" as needed.
There was a problem hiding this comment.
Using "_from_cup" or "_from_tea" suffix now.
|
|
||
| // advanced tea | ||
| addTea(consumer, cup_cocoa, Items.COCOA_BEANS, Items.COCOA_BEANS, teapot_frothed); | ||
| addTea(consumer, cup_cocoa, Items.COCOA_BEANS, cup_frothed); |
There was a problem hiding this comment.
Why is this just 1 cocoa beans instead of 2? 1 cup milk + 2 cocoa = 1 cup cocoa.
There was a problem hiding this comment.
Added second cocoa bean to cocoa from cup recipe.
|
|
||
| @Override | ||
| public ItemStack finishUsingItem(ItemStack stack, Level worldIn, LivingEntity living) { | ||
| boolean isMilk = stack.is(Registration.cup_frothed); |
There was a problem hiding this comment.
I don't like having to special case this. Lets instead make the CocoaItem constructor take in a CocoaDrink parameter, then use that field instead of a static reference through config. Will let you pass in the proper drink for each of cocoa and milk
There was a problem hiding this comment.
Since the CocoaDrink config was already being passed in as FoodProperties, I used that in CocoaItem instead (similar to how it was already used in TeaCupItem).
| addTea(consumer, cup_cocoa, Items.COCOA_BEANS, Items.COCOA_BEANS, teapot_frothed); | ||
| addTea(consumer, cup_cocoa, Items.COCOA_BEANS, cup_frothed); | ||
| addHoney(consumer, RecipeCategory.FOOD, cup_cocoa, tea_stick, CocoaItem.CINNAMON_TAG); | ||
| addTea(consumer, cup_tea_chai, teabag_black, tea_stick, teapot_frothed); |
There was a problem hiding this comment.
Iced tea and chai both are not added using the helper above, so they need their hot water cup recipes here like you did with cocoa.
There was a problem hiding this comment.
It looks like iced tea doesn't even need a teapot at all. The recipe is just a cup, teabag, apple, and ice cubes.
There was a problem hiding this comment.
Huh, that doesn't seem right. I need to remember my reasoning for that. It might just be a bug as I could not use the helper with the tag.
I'll consider whether it should have a pot in the recipe after this PR is finished.
There was a problem hiding this comment.
I added the cup recipe for chai.
Another recipe that you could consider is frothed milk with cinnamon. I wasn't sure whether it made sense or not as hot water and frothed milk are supposed to be much less useful than the actual teas or cocoa, but it would be useful for frothed milk to also have the option to clear all status effects instead of just one.
There was a problem hiding this comment.
Frothed milk with cinnamon seems like something someone would drink. So sure, why not.
| cup_tea_chorus = register(r, new TeaCupItem(props.food(Config.SERVER.chorus_tea)), "cup_tea_chorus"); | ||
| cup_water_hot = register(r, new Item(props.food(new FoodProperties.Builder().alwaysEat().build())), "cup_water_hot"); | ||
| cup_cocoa = register(r, new CocoaItem(props.food(Config.SERVER.cocoa)), "cup_cocoa"); | ||
| cup_frothed = register(r, new CocoaItem(props.food(Config.SERVER.cocoa)), "cup_frothed"); |
There was a problem hiding this comment.
this should be frothed_milk, not cocoa. Also, like I suggested in CocoaItem, lets pass in Config.SERVER.cocoa/Config.SERVER.frothed_milk to the constructor parameter so we have cure effect properties.
There was a problem hiding this comment.
I thought I had already caught and changed that. Maybe I didn't push in the change. It's fixed now.
|
Overall a great start. Most of the comments are some namespacing issues with the recipes, and a couple of recipes you missed adding.
I left some comments, but it should definitely have its own config, just a different default. Lets default cocoa to "clear a random positive effect" and default milk to "clear a random effect, positive or negative". Should also have low food values, since there is no milking delay so milk is a nearly free food source; its the cocoa beans that make hot cocoa restore most of its hunger.
I'm not sure I like this recipe. I think I'd rather just treat the filled pots as "fluid handler items" and support emptying them into tanks, so it be the domain of #46. You could also let the player just dump out a filled but not hot teapot by right clicking a block with it. No need to place a fluid, but play a nice sound like dumping a bucket (and if you want to be very fancy, throw in some water/milk particles). Should require the player to be sneaking to do so. At that point, sneak+right click could dump a hot teapot too. Note there is a good chance this feature would conflict with #57 as both require adding a class for filled not-hot teapots.
I like this idea, just make sure all the recipes are the same (you were missing a couple, and cooca had too few beans, I don't want a discount because you used a cup or used a pot). |
|
This will need #57 to completely work, so I'm going to convert it into a draft until that's complete and merged in. The recipe are cleaned up, frothed milk is set up with a config, and teapots can be dumped. I even added new splash particles for the milk. |
|
1.20 branch merged in (including #57), and frothed milk with cinnamon recipe added |
|
Was there something else you still wanted me to change? |
|
Apologizes, I have been focused on other projects. Not sure when I'll come back to this one but may be a little bit. |
Added two new items:
Also added several new recipes:
Closes #47
Happy Modtober 2024!